package com.smart.manager.union.mall.body;

import com.smart.common.entities.core.BaseSearch;
import com.smart.manager.union.egg.enums.EggOrderState;
import com.smart.manager.union.mall.enums.MallOrderState;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;


/**
 * 帮助
 *
 * @author Leo
 * @date 2023/08/16
 */
public class RUnionMallOrder {

    @Data
    @EqualsAndHashCode(callSuper = true)
    @ApiModel("RUnionMallOrder1")
    public static class SearchBody extends BaseSearch {


        @ApiModelProperty("收件人信息")
        private String keyword;

        @ApiModelProperty("订单状态")
        private MallOrderState state;


        @ApiModelProperty("下单时间")
        private String submitRange;


        @ApiModelProperty("下单时间")
        private String sendRangeRange;


        @ApiModelProperty("快递名称")
        private String expressName;

        @ApiModelProperty("快递单号")
        private String expressCode;


    }


    @Data
    @ApiModel("RUnionMallOrder2")
    public static class ReplenishExpress {


        @ApiModelProperty("订单编号")
        @NotNull(message = "订单编号 不能为空")
        private Long id;



        @ApiModelProperty("快递名称")
        @NotBlank(message = "快递名称 不能为空")
        private String expressName;


        @ApiModelProperty("快递单号")
        @NotBlank(message = "快递单号 不能为空")
        private String expressCode;


        @ApiModelProperty("快递费用")
        @NotNull(message = "快递费用 不能为空")
        private BigDecimal expressFee;


    }





    @Data
    @ApiModel("RUnionMallOrder3")
    public static class CreateBody   {


        @ApiModelProperty("商品ID")
        @NotNull(message = "商品编号不能为空")
        private Long goodsId;

        @ApiModelProperty("购买数量")
        @NotNull(message = "购买数量 不能为空")
        @Min(value = 1,message = "购买数量不能小于1")
        private Integer quantity;




    }


}
